import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import NotFound from '@/components/NotFound'
import about from '@/components/about'
import photo from '@/components/photo'
import diary from '@/components/diary'
import heart from '@/components/heart'
import study from '@/components/study'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      meta: {
        title: '张林的个人博客 - 首页'
      }
    },
    {
      path: '/about',
      name: 'about',
      component: about,
      meta: {
        title: '张林的个人博客 - 关于我'
      }
    },
    {
      path: '/photo',
      name: 'photo',
      component: photo,
      meta: {
        title: '张林的个人博客 - 私密相册'
      }
    },
    {
      path: '/diary',
      name: 'diary',
      component: diary,
      meta: {
        title: '张林的个人博客 - 博客日记'
      }
    },
    {
      path: '/heart',
      name: 'heart',
      component: heart,
      meta: {
        title: '张林的个人博客 - 心路历程'
      }
    },
    {
      path: '/study',
      name: 'study',
      component: study,
      meta: {
        title: '张林的个人博客 - 学海无涯'
      }
    },
    { path: '*', name:'NotFound',component:NotFound }
  ]
})
